<?php
/*
 * 新锐微信登录 [ 深圳市新锐创意科技有限公司旗下产品 ]
 * Copyright  2015-2099 www.xinruiweb.com  All Rights Reserved.
 * 技术开发: 75674952@qq.com
 * 请支持正版授权产品
 */

if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}



$username = trim($_REQUEST['username']);

$uid = trim($_REQUEST['uid']);

showformheader('plugins&operation=config&do='.$pluginid.'&identifier='.$plugin['identifier'].'&pmod=admincp_list', 'enctype');

showtableheader(lang('plugin/xinrui_qq', 'admin_list_search'));
showsetting(lang('plugin/xinrui_qq', 'admin_list_user'), 'username', $username, 'text', '', 0);
showsetting(lang('plugin/xinrui_qq', 'admin_list_uid'), 'uid', $uid, 'text', '', 0);

showsubmit('editsubmit');
showtablefooter();
showformfooter();
$where = ' 1 = 1 ';
if($username){
    $where .= " and username = '".$username."'";
}
if($uid){
    $where .= " and uid = '".$uid."'";
}

showtableheader(lang('plugin/xinrui_qq', 'admin_list_title'));
showsubtitle(array(
    lang('plugin/xinrui_qq', 'admin_list_table0'),
    lang('plugin/xinrui_qq', 'admin_list_uid'),
    lang('plugin/xinrui_qq', 'admin_list_table1'),
    lang('plugin/xinrui_qq', 'admin_list_table2'),
    lang('plugin/xinrui_qq', 'admin_list_table3'),
    lang('plugin/xinrui_qq', 'admin_list_table4'),
    lang('plugin/xinrui_qq', 'admin_list_table6'),
    lang('plugin/xinrui_qq', 'admin_list_table7'),
    lang('plugin/xinrui_qq', 'admin_list_table8'),
));

$pagenum=20;
$page=max(1,intval($_GET['page']));
$count=DB::result_first("select count(*) from ".DB::table('xinrui_qq_user')." where $where");
$list=DB::fetch_all("select * from ".DB::table('xinrui_qq_user')." where  $where order by id desc ".DB::limit(($page-1)*$pagenum,$pagenum));
foreach($list as $data) {
	showtablerow('', array('class="td_k"', 'class="td_k"', 'class="td_l"'), array(
		$data['id'],
        $data['uid'],
		'<a href="home.php?mod=space&uid='.$data['uid'].'" target="_blank">'.$data['username'].'</a>',
		$data['nickname'],
		$data['sex'] == 1?lang('plugin/xinrui_qq', 'admin_list_sex1'):lang('plugin/xinrui_qq', 'admin_list_sex2'),
        $data['area'],
        $data['bind'] == $data['uid']?lang('plugin/xinrui_qq', 'admin_list_no'):'<a href="home.php?mod=space&uid='.$data['uid'].'" target="_blank">'.$data['uid'].'</a>',
        $data['isuser'] == 1?lang('plugin/xinrui_qq', 'admin_list_yes'):lang('plugin/xinrui_qq', 'admin_list_no'),
        $data['ispwd'] == 1?lang('plugin/xinrui_qq', 'admin_list_yes'):lang('plugin/xinrui_qq', 'admin_list_no'),
		
	));
}
showtablefooter();
echo multi($count,$pagenum,$page,ADMINSCRIPT."?action=plugins&operation=config&do=$pluginid&identifier=".$plugin['identifier']."&pmod=admincp_list&username=".$username."&uid=".$uid."");
?>